package com.kiln.juxingqs.ui

import com.kiln.juxingqs.R
import com.kiln.juxingqs.adapter.RechargeRecordFragmentPageAdapter
import com.kiln.juxingqs.databinding.ActivityRechargerecordBinding
import com.kiln.juxingqs.ui.vm.RechargeRecordViewModel
import com.kiln.juxingqs.BaseMiddleActivity

class RechargeRecordActivity :
    BaseMiddleActivity<RechargeRecordViewModel, ActivityRechargerecordBinding>() {

    override fun getLayout(): Int {
        return R.layout.activity_rechargerecord
    }

    val adapter: RechargeRecordFragmentPageAdapter by lazy {
        RechargeRecordFragmentPageAdapter(supportFragmentManager)
    }

    override fun initView() {
        binding?.apply {
            event = this@RechargeRecordActivity
            vm = viewModel
            binding.viewPager.adapter = adapter
            binding.tabLayout.setupWithViewPager(binding.viewPager)
        }
    }

    override fun initViewModel(): RechargeRecordViewModel = createViewModel()

}